package com.kvest.fortests.broadcastreceiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import java.util.Iterator;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: Kvest
 * Date: 02.06.13
 * Time: 15:02
 * To change this template use File | Settings | File Templates.
 */
public class StaticBroadcastReceiver extends BroadcastReceiver {
    public static final String ACTION = "com.kvest.fortests.broadcastreceiver.STATIC_RECEIVER";

    @Override
    public void onReceive(Context context, Intent intent) {
        Log.d("KVEST_TAG", "onReceive from StaticBroadcastReceiver[" + intent.getAction() + "]:");
        Bundle extras = intent.getExtras();
        Set<String> keys = extras.keySet();
        String key;
        for (Iterator<String> it = keys.iterator(); it.hasNext();) {
            key = it.next();
            Log.d("KVEST_TAG", key + " = " + extras.get(key).toString());
        }
    }
}
